package fjut.acm.coding.controller;

import fjut.acm.coding.entity.result.ResultCode;
import fjut.acm.coding.entity.result.ResultJson;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/")
@CrossOrigin
public class RootController {

    @GetMapping("/")
    public ResultJson root(){
        ResultJson json = new ResultJson(ResultCode.REQUIRED_SUCCESS);
        json.addInfo("Hello World!");
        return json;
    }
}
